import javax.swing.*;
import java.awt.*;

public class GameFrame extends JFrame {
    final int frameSize = 1000;
    public void launch(){
    this.setTitle("贪吃蛇");
    this.setSize(frameSize,frameSize);
    this.setLocationRelativeTo(null);
    this.setVisible(true);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    public void paint(Graphics graphics){
        graphics.setColor(Color.blue);
        graphics.fillRect( 0,0,frameSize,frameSize);
    }

    public static void main(String[] args) {
        GameFrame gameFrame =new GameFrame();
        gameFrame.launch();
    }
}
